import { Column, Entity, PrimaryGeneratedColumn } from "typeorm";

@Entity("kline_trend", { schema: "qmt-basic" })
export class KlineTrend {
  @Column("varchar", { name: "code", comment: "股票代码", length: 20 })
  code: string;

  @Column("bigint", { name: "start_date", comment: "区间开始时间" })
  startDate: string;

  @Column("bigint", { name: "end_date", comment: "区间结束时间" })
  endDate: string;

  @Column("int", { name: "type", comment: "趋势类型" })
  type: number;

  @Column("float", { name: "high", comment: "区间最高值", precision: 12 })
  high: number;

  @Column("float", { name: "low", comment: "区间最低值", precision: 12 })
  low: number;

  @Column("int", { name: "volume_type", comment: "成交量类型" })
  volumeType: number;

  @Column("float", { name: "open", comment: "区间开盘价", precision: 12 })
  open: number;

  @Column("float", { name: "close", comment: "区间闭盘价", precision: 12 })
  close: number;

  @PrimaryGeneratedColumn({ type: "int", name: "id" })
  id: number;
}
